The present invention relates to the field of computer graphics, and in particular to methods and apparatus for creating, modifying, and using components to create computer graphics productions. Many computer graphic images are created by mathematically modeling the interaction of light with a three dimensional scene from a given viewpoint. This process, called rendering, generates a two-dimensional image of the scene from the given viewpoint, and is analogous to taking a photograph of a real-world scene. Animated sequences can be created by rendering a sequence of images of a scene as the scene is gradually changed over time. A great deal of effort has been devoted to making realistic looking and artistically compelling rendered images and animations.
In conventional photography and cinematography, artists often use the physical limitations of conventional optical and photographic equipment to achieve aesthetic effects. For example, depth of field is a visual effect in which some portions of an image are in focus and other portions of the image are out of focus. Depth of field is the result of the aperture size of a camera and the focal length of its optical system. Typical cameras can only focus on objects within a range of distances, referred to as the depth of field. For out of focus portions of an image, typical optical systems blur each point of light into a roughly circular area on the image plane, referred to as a circle of confusion. Objects that are within the camera's depth of field appear in focus, while objects in front of or behind the depth of field appear out of focus.
Although a camera with an infinite depth of field, in which everything in an image is in focus regardless of its distance from the camera, may be ideal from a technical perspective, artists often use the depth of field of conventional cameras to emphasize or deemphasize objects in a scene. Also, the out of focus objects in a scene may be aesthetically pleasing, enhancing the artistic impact of images.
In addition to normal depth of field effects, which result even from ideal optical systems having finite size apertures, there are other optical system effects in real-world optical systems that have an aesthetic impact on images. For example, photographers use the Japanese term “bokeh” to describe the aesthetic qualities of the unfocused portions of an image. Lenses and other camera optical systems with identical focal lengths and other characteristics may have different bokeh. For some optical systems, the circle of confusion produced by an out of focus point is brighter at its center than its edges. Photographers often consider this effect to be aesthetically pleasing and refer to these types of optical systems as having good bokeh. Conversely, other types of optical systems produce a circle of confusion with a dark center and bright edges, which some photographers consider to be aesthetically displeasing.
Additionally, the bokeh of optical systems is affected by the shape of the optical system aperture. Typical optical systems include an aperture for controlling the amount of light that reaches the image plane of a camera. A circular aperture will produce a circular-shaped circle of confusion for unfocused points in an image. Many optical systems use mechanical iris to form polygonal shaped apertures. For example, a mechanical iris with six blades will typically form a hexagonal shaped aperture. The blades of a mechanical iris may be bowed inwards or outwards to further approximate a circular aperture. A polygonal shaped aperture will form a similarly shaped circle of confusion for unfocused points in an image.
Because audiences have become accustomed to viewing images created using real-world cameras and optics, computer graphics artists have sought to emulate optical system effects such as depth of field and bokeh to provide their images and animations with additional verisimilitude.
One prior approach places a virtual optical system and/or virtual camera aperture in front of each image sample, such as a pixel or sub-pixel sample. Each image sample is assigned to a different portion of the aperture. Rendering algorithms such as ray tracing can be used to trace the path of light through the aperture and optical system into the scene, thereby simulating depth of field effects. Because this approach requires light rays to be traced from the image samples, through different portions of the aperture, and into the scene, it can only be used with ray tracing and other similar rendering algorithms modeling light transport. Ray tracing in rendering consumes large amounts of computational time and resources, which makes it unsuitable for many real-time applications as well as non-real-time applications where computational time and resources are limited.
It is therefore desirable for a system and method to provide improved optical system effects for computer generated images and animations. It is desirable for the system and method to be suitable for use with a wide variety of rendering algorithms. It is further desirable for the system and method to provide artists with greater aesthetic control over optical system effects than what is possible with typical real-world optical systems.